// vue3 的路由配置
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'


export const routes: Array<RouteRecordRaw> = [

    {   // 商品
        path:"/product",
        name:"product",
        component:()=>import("../views/Product/index.vue"),
        meta:{menu:true},
        children:[
            {   // 商品管理
                path:"manage",
                name:"manage",
                component:()=>import("../views/Product/manage.vue"),
                meta:{menu:true}
            },{
                // 商品分组
                path:"group",
                name:"group",
                component:()=>import("../views/Product/group.vue"),
                meta:{menu:true}
            },{
                // 品牌管理
                path:"brand",
                name:"brand",
                component:()=>import("../views/Product/brand.vue"),
                meta:{menu:true}
            },
            {
                // 商品标签
                path:"tag",
                name:"tag",
                component:()=>import("../views/Product/tag.vue"),
                meta:{menu:true}
            },{
                // 商品属性
                path:"attribute",
                name:"attribute",
                component:()=>import("../views/Product/attribute.vue"),
                meta:{menu:true}
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
